//
//  error.swift
//  Extend
//
//  Created by 元穗 on 2017/5/19.
//  Copyright © 2017年 yuansui. All rights reserved.
//

import Foundation

open class NetworkErr {
    internal var message: String = String();
    internal var code: Int = -999;

    public init(_ code: Int, _ msg: String) {
        self.code = code;
        message = msg;
    }

    init(_ code: Int) {
        self.code = code;
    }

    init() {
    }

    public func getCode() -> Int {
        return code;
    }

    public func getMessage() -> String {
        return message;
    }
}

open class ParseErr: NetworkErr {

}

open class ConnectionErr: NetworkErr {

}
